package datas;

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public class Data15
{

	public static void main(String[] args)
	{
		Date d = new Date();
		Calendar c = Calendar.getInstance();
		c.setTime(d);
		System.out.println(d);
		
		c.add(Calendar.HOUR,3);
		d = c.getTime();
		System.out.println(d);;
		
		Locale l = new Locale("pt","BR");
		DateFormat df = DateFormat.getDateInstance(DateFormat.FULL,l);
		System.out.println(df.format(d));
		
		c.set(2010, 11, 3);
		Date dd = c.getTime();
		
		Locale ll = new Locale("it","IT");
		Locale lll = new Locale("pt","BR");
		Locale llll = new Locale("da","DK");
		
		System.out.println("pais "+ll.getDisplayCountry());
		System.out.println("pais "+lll.getDisplayCountry());
		System.out.println("pais "+llll.getDisplayCountry());
		
		System.out.println("idioma "+llll.getDisplayLanguage());
		System.out.println("idioma "+llll.getDisplayLanguage(llll));
		System.out.println("idioma "+ll.getDisplayLanguage());
		System.out.println("idioma "+ll.getDisplayLanguage(ll));
		
		usarLocale();
		usarLocales();
	}

	private static void usarLocales()
	{
		// TODO Auto-generated method stub
		Locale l = new Locale("ru","RU");
		Locale ll = new Locale("pt","BR");
		
		System.out.println(l.getDisplayCountry());
		System.out.println(l.getDisplayLanguage());
		
		System.out.println(ll.getDisplayCountry());
		System.out.println(ll.getDisplayLanguage());
	}

	private static void usarLocale()
	{
		// TODO Auto-generated method stub
		System.out.println("##############");
		Locale l = new Locale("vi","VN");
		System.out.println(DateFormat.getDateInstance(DateFormat.FULL,l).format(new Date()));
		
	}
}
